package org.yangjie.controller;

/**
 * 返回状态枚举
 * @author YangJie [2018年12月27日]
 */
public enum CodeEnum {
	
	SUCCESS(0, "请求成功"),
	FAIL(1001, "请求失败"),
	
	// 全局异常
	C400(400, "参数错误"),
	C401(401, "登录超时"),
	C402(402, "签名错误"),
	C403(403, "无权访问"),
	C404(404, "请求无效"),
	C500(500, "系统错误");

	
	private int code;
	private String msg; 
	
	CodeEnum(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
